<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Images extends Model
{
    /**
     * 关联到模型的数据表
     *
     * @var string
     */
    protected $table = 'images';
    
    /**
     * 可以被批量赋值的属性.
     *
     * @var array
     */
    protected $fillable = ['user_id','classify_id','parent_id','filename','filepath','filesize','filewidth','fileheight'];

    /**
     * 获取图片对应的用户
     */
    public function user()
    {
        return $this->belongsTo('App\Models\User');
    }


}
